
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg

BIN=${ARCH}/analoginput.bin
EXEC=analoginput.exe
PGM=${ARCH}/$(EXEC)

# optional managers required
MANAGERS=all

# C source names
CSRCS = $(wildcard ./*.s) $(wildcard ./*.c)
COBJS = $(patsubst %.c,${ARCH}/%.o,$(CSRCS))

# C++ source names
CXXSRCS = $(wildcard ./*.cpp)
CXXOBJS = $(patsubst %.cpp,${ARCH}/%.o,$(CXXSRCS))


OBJS= $(COBJS) $(CXXOBJS)

all:    ${ARCH} $(PGM) $(BIN)

$(PGM): $(OBJS)
	$(make-exe)
$(BIN): $(PGM)
	$(OBJCOPY) -O binary $^ $@
CFLAGS +=
CXXFLAGS += -std=c++11 -fno-exceptions
CPPFLAGS +=
LDFLAGS += -fwhole-program -Wl,--gc-sections -fno-exceptions
